<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title>传输详情 - Multi Transfer</title>
    <!-- Bootstrap CSS -->
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link href="/font/bootstrap-icons.css" rel="stylesheet">
    <!-- 自定义样式 -->
    <style>
        body {
            background-color: #f8f9fa;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .navbar {
            background-color: #4a6cf7 !important;
            box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
        }

        .card {
            border: none;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
            margin-bottom: 20px;
        }

        .btn-primary {
            background-color: #4a6cf7;
            border-color: #4a6cf7;
        }

        .btn-primary:hover {
            background-color: #3a5ce5;
            border-color: #3a5ce5;
        }

        .attachment-box {
            background-color: #f8f9fa;
            border-radius: 8px;
            padding: 15px;
            margin-top: 20px;
            border-left: 4px solid #28a745;
        }

        .attachment-link {
            color: #28a745;
            text-decoration: none;
            font-weight: 500;
        }

        .attachment-link:hover {
            color: #218838;
            text-decoration: underline;
        }

        .meta-info {
            color: #6c757d;
            font-size: 0.9rem;
            margin-top: 15px;
        }

        .content-box {
            background-color: #fff;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            border-left: 4px solid #4a6cf7;
            line-height: 1.6;
        }
    </style>
</head>
<body>
<!-- 导航栏 -->
<nav class="navbar navbar-expand-lg navbar-dark">
    <div class="container">
        <a class="navbar-brand" href="#">
            <i class="bi bi-cloud-arrow-up"></i> Multi Transfer
        </a>
        <button class="navbar-toggler" data-bs-target="#navbarNav" data-bs-toggle="collapse" type="button">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav ms-auto">
                <li class="nav-item">
                    <a class="nav-link" th:href="@{/transfer}">传输列表</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" th:href="@{/transfer/new}">新传输</a>
                </li>
            </ul>
        </div>
    </div>
</nav>

<!-- 主要内容 -->
<div class="container mt-4">
    <div class="row mb-4">
        <div class="col-md-8">
            <h1 class="display-5 fw-bold">传输详情</h1>
            <p class="lead">查看传输项目的详细信息</p>
        </div>
        <div class="col-md-4 text-end">
            <a class="btn btn-outline-secondary mt-3" th:href="@{/transfer}">
                <i class="bi bi-arrow-left"></i> 返回列表
            </a>
        </div>
    </div>

    <!-- 传输内容 -->
    <div class="card">
        <div class="card-body">
            <div class="content-box" th:text="${transfer.content}">
                传输内容
            </div>

            <div class="meta-info">
                <i class="bi bi-calendar3"></i>
                <span>创建时间：</span>
                <span th:text="${transfer.createdAt}">创建时间</span>
            </div>

            <!-- 附件信息 -->
            <div class="attachment-box" th:if="${transfer.storedFilename}">
                <h5><i class="bi bi-paperclip"></i> 附件</h5>
                <a class="attachment-link"
                   th:href="@{/transfer/{id}/download(id=${transfer.id})}"
                   th:text="${transfer.originalFilename}">
                    附件名称
                </a>
            </div>
        </div>
    </div>

    <!-- 操作按钮 -->
    <div class="text-center mt-4">
        <a class="btn btn-primary" th:href="@{/transfer}">
            <i class="bi bi-list"></i> 返回传输列表
        </a>
        <a class="btn btn-outline-primary ms-2" th:href="@{/transfer/new}">
            <i class="bi bi-plus-circle"></i> 新传输
        </a>
    </div>
</div>

<!-- 页脚 -->
<footer class="bg-light text-center py-3 mt-5">
    <div class="container">
        <p class="mb-0 text-muted">© 2023 Multi Transfer. All rights reserved.</p>
    </div>
</footer>

<!-- Bootstrap JS -->
<script src="/js/bootstrap.bundle.min.js"></script>
</body>
</html>
